[Ivy]
[>Created: Mon Jan 28 17:37:24 ICT 2013]
13C6AD882E647711 3.17 #module
>Proto >Proto Collection #zClass
gt0 getTaskList Big #zClass
gt0 B #cInfo
gt0 #process
gt0 @TextInP .resExport .resExport #zField
gt0 @TextInP .type .type #zField
gt0 @TextInP .processKind .processKind #zField
gt0 @AnnotationInP-0n ai ai #zField
gt0 @TextInP .xml .xml #zField
gt0 @TextInP .responsibility .responsibility #zField
gt0 @StartSub f0 '' #zField
gt0 @EndSub f1 '' #zField
gt0 @GridStep f3 '' #zField
gt0 @PushWFArc f2 '' #zField
gt0 @Alternative f5 '' #zField
gt0 @PushWFArc f4 '' #zField
gt0 @GridStep f7 '' #zField
gt0 @PushWFArc f8 '' #zField
gt0 @PushWFArc f9 '' #zField
gt0 @GridStep f10 '' #zField
gt0 @PushWFArc f11 '' #zField
gt0 @PushWFArc f6 '' #zField
>Proto gt0 gt0 getTaskList #zField
gt0 f0 inParamDecl '<> param;' #txt
gt0 f0 outParamDecl '<List<ch.ivy.demo.UserTask> taskList> result;
' #txt
gt0 f0 outParamTable 'result.taskList=in.userTask;
' #txt
gt0 f0 actionDecl 'ch.ivy.demo.TaskList out;
' #txt
gt0 f0 callSignature getTaskList() #txt
gt0 f0 type ch.ivy.demo.TaskList #txt
gt0 f0 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>getTaskList(UserInfo)</name>
        <nameStyle>21,5,7
</nameStyle>
    </language>
</elementInfo>
' #txt
gt0 f0 83 51 26 26 14 0 #rect
gt0 f0 @|StartSubIcon #fIcon
gt0 f1 type ch.ivy.demo.TaskList #txt
gt0 f1 83 307 26 26 14 0 #rect
gt0 f1 @|EndSubIcon #fIcon
gt0 f3 actionDecl 'ch.ivy.demo.TaskList out;
' #txt
gt0 f3 actionTable 'out=in;
' #txt
gt0 f3 actionCode 'import ch.ivy.demo.UserTask;
UserTask task;
for(int i = 0; i < 15; i++) {
	task = new UserTask();
	task.id= i.toString();
	task.status = "PENDING DEP HR"; 
	task.taskName = "Task" + i;
	
	task.employeeNum ="3120.1120."+i;
	if(i == 0 || i == 14) {
		task.type = "Additional Job";
		task.department = "Personalamt";
	} else if(i == 1 || i== 10) {
		task.type = "Unpaid Leave";
		task.department = "Personalamt";
	} else if(i == 2 || i == 6) {
		task.type = "Contract Modification";
	
		task.department = "Personalamt";
	} else if( i == 3 || i == 7 || i == 9 || i == 11) {
		task.type = "Individual Traning";
		task.department = "Personalamt";
	} else if( i == 4 || i == 8) {
		task.type = "Employment"	;
		task.department = "Kapo";
	}
	in.userTask.add(task);
}' #txt
gt0 f3 type ch.ivy.demo.TaskList #txt
gt0 f3 78 204 36 24 20 -2 #rect
gt0 f3 @|StepIcon #fIcon
gt0 f2 expr out #txt
gt0 f2 96 228 96 307 #arcP
gt0 f5 type ch.ivy.demo.TaskList #txt
gt0 f5 82 138 28 28 14 0 #rect
gt0 f5 @|AlternativeIcon #fIcon
gt0 f4 expr in #txt
gt0 f4 outCond in.currentUser.userRole.startsWith("dep") #txt
gt0 f4 96 166 96 204 #arcP
gt0 f7 actionDecl 'ch.ivy.demo.TaskList out;
' #txt
gt0 f7 actionTable 'out=in;
' #txt
gt0 f7 actionCode 'import ch.ivy.demo.UserTask;
UserTask task;
for(int i = 0; i < 10; i++) {
	task = new UserTask();
	task.id= i.toString();
	task.status = "PENDING HR CON"; 
	task.taskName = "Task" + i;
		task.department = "Kapo";
	task.employeeNum ="5120.1120."+i;
	if(i == 0) {
		task.type = "Additional Job";
	} else if(i == 1 || i == 7) {
		task.type = "Unpaid Leave";
	} else if(i == 2 || i == 6) {
		task.type = "Contract Modification";
	} else if( i == 3 || i ==9) {
		task.type = "Individual Traning";
	} else if( i == 4 || i == 5) {
		task.type = "Employment"	;
	} else {
		task.type = "Unpaid Leave"	;
	}
	in.userTask.add(task);
}' #txt
gt0 f7 type ch.ivy.demo.TaskList #txt
gt0 f7 158 204 36 24 20 -2 #rect
gt0 f7 @|StepIcon #fIcon
gt0 f8 expr in #txt
gt0 f8 outCond in.currentUser.userRole.startsWith("hr") #txt
gt0 f8 104 158 161 204 #arcP
gt0 f9 expr out #txt
gt0 f9 167 228 103 309 #arcP
gt0 f10 actionDecl 'ch.ivy.demo.TaskList out;
' #txt
gt0 f10 actionTable 'out=in;
' #txt
gt0 f10 actionCode 'import ch.ivy.demo.UserInfo;

in.currentUser = ivy.#session.getAttribute("user") as UserInfo;
' #txt
gt0 f10 type ch.ivy.demo.TaskList #txt
gt0 f10 78 92 36 24 20 -2 #rect
gt0 f10 @|StepIcon #fIcon
gt0 f11 expr out #txt
gt0 f11 96 77 96 92 #arcP
gt0 f6 expr out #txt
gt0 f6 96 116 96 138 #arcP
>Proto gt0 .type ch.ivy.demo.TaskList #txt
>Proto gt0 .processKind CALLABLE_SUB #txt
>Proto gt0 .xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language/>
</elementInfo>
' #txt
>Proto gt0 0 0 32 24 18 0 #rect
>Proto gt0 @|BIcon #fIcon
gt0 f3 mainOut f2 tail #connect
gt0 f2 head f1 mainIn #connect
gt0 f5 out f4 tail #connect
gt0 f4 head f3 mainIn #connect
gt0 f5 out f8 tail #connect
gt0 f8 head f7 mainIn #connect
gt0 f7 mainOut f9 tail #connect
gt0 f9 head f1 mainIn #connect
gt0 f0 mainOut f11 tail #connect
gt0 f11 head f10 mainIn #connect
gt0 f10 mainOut f6 tail #connect
gt0 f6 head f5 in #connect
